import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";

// 引入全局组件 店铺主页 | 个人中心 | 关注我们 | 店铺信息.
import StoreInformation from "@/components/StoreInformation";
Vue.component("StoreInformation", StoreInformation);

// 导入vant
import Vant from "vant";
import "vant/lib/index.css";
Vue.use(Vant);

//全局引入axios
import axios from "axios";
import VueAxios from "vue-axios";
// VueAxios 与 axios 的位置不能交换，否则出现 TypeError: Cannot read property 'protocol' of undefined
axios.defaults.baseURL = "http://localhost:3000";
Vue.use(VueAxios, axios);

// 导入饿了么ui
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
Vue.use(ElementUI);

new Vue({
  router,
  store,
  render: h => h(App),
}).$mount("#app");
